import math


class Shape:
    def area(self):
        pass


class Circle(Shape):
    def __init__(self, r):
        self.r = r

    def area(self):
        return math.pi * self.r ** 2


class Rectangle(Shape):
    def __init__(self, w, h):
        self.w = w
        self.h = h

    def area(self):
        return self.w * self.h


if __name__ == '__main__':
    shapes = [Circle(5), Rectangle(5, 10), Rectangle(10, 20)]
    for shape in shapes:
        print(shape.area())
